lib/commit: Use provided length when doing writes
authorColin Walters <walters@verbum.org>
Thu, 29 Jun 2017 19:58:05 +0000 (15:58 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 4 Jul 2017 16:15:11 +0000 (16:15 +0000)
commit8d4d638e99aff8a4a0abfe08f91284a6adbf9dc2
tree5e80e8590a0db3426119a8f678f1a9f4399c6b86
parent3348baf6eb69be0ec8ac3138e696e2828a0cc9e3
lib/commit: Use provided length when doing writes

This is prep for storage space checks, where we look at free
space after parsing the metadata, before we write anything.

We did length-limited writes in the fd-based input path, but not for the
`GInputStream` path which in practice is used for HTTP pulls.

Closes: #987
Approved by: jlebon
src/libostree/ostree-repo-commit.c